package http;

import com.gaoxiao.framework.commonfiles.utils.HttpInvoker;
import org.junit.Before;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by xuxiang on 2016/7/28.
 */
public class HttpTest {
//    Map<String, Object> paramMap = new HashMap<String, Object>();
    Map<String, String> paramMap = new HashMap<String, String>();
    HttpInvoker invoker ;

    @Test
    public void test(){
        HttpInvoker invoker = HttpInvoker.getInstance();
//        invoker.setHost("http://120.27.240.44:8081/jiaxiaopeixun");
        invoker.setHost("http://localhost:8180/jiaxiaopeixun");
    }

    @Before
    public void init(){
        invoker = HttpInvoker.getInstance();
        invoker.setHost("http://localhost:8180/jiaxiaopeixun");
//        invoker.setHost("http://120.27.240.44:8081/jiaxiaopeixun");
    }

    //获取验证码 ok
    @Test
    public void getVerificationCode(){
        long startTime = System.currentTimeMillis();
        paramMap.put("mobile" , "17701783875");
        String content = invoker.get("/member/information/getVerificationCode", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    //获取验证码
    @Test
    public void getResetMemberVerificationCode(){
        long startTime = System.currentTimeMillis();
        Object object = new Object();
        paramMap.put("mobile" , "13052087710");
        String content = invoker.get("/member/information/getResetMemberVerificationCode", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }
    //注册用户
    @Test
    public void register(){
        long startTime = System.currentTimeMillis();
        paramMap.put("mobile" , "18626150513");
        paramMap.put("password" , "123qwe");
        paramMap.put("checkCode" , "1643");
        paramMap.put("randomCodeKey" , "GX_RANDOM_CODE17701783875");//f8b614a2d0df42129aacc872db5bdb58
        String content = invoker.post("/member/information/register", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }



    /**
     * 重置用户密码
     */
    @Test
    public void resetMember(){
        long startTime = System.currentTimeMillis();
        paramMap.put("mobile" , "15618043022");
        paramMap.put("password" , "888888");
        paramMap.put("checkCode" , "1958");
        paramMap.put("randomCodeKey" , "GX_RANDOM_CODE15618043022");
        String content = invoker.post("/member/information/resetMember", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 退出登录
     */
    @Test
    public void quitLogin(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147270811700250513");
        String content = invoker.get("/member/information/quitLogin", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取个人信息
     */
    @Test
    public void  getPersonalInformation(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147184592090183875");
        String content = invoker.get("/member/information/getPersonalInformation", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 更新密码
     */
    @Test
    public void updatePassword(){
        long startTime = System.currentTimeMillis();
        paramMap.put("oldPassword" , "654321");
        paramMap.put("newPassword" , "123456");
        paramMap.put("tokenKey" , "TOKEN_147184573802983875");
        String content = invoker.post("/member/information/updatePassword", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 更新用户个人信息（除用户头像和密码）
     */
    @Test
    public void updatePersonInfo(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147184589641583875");
        paramMap.put("param" , "男");
        paramMap.put("type" , "4");
        String content = invoker.get("/member/information/updatePersonInfo", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    /**
     * 获取版本信息
     */
    @Test
    public void getVersion(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("aboutUs/getVersion",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取常见问题
     */
    @Test
    public void getCommonProblemData(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("common/problem/getCommonProblemData",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 首页的课程信息
     */
    @Test
    public void getCourseInfo(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("courseInfo/getCourseInfo",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 根据课程的id，获取到课程的服务特色和报名须知
     */
    @Test
    public void getCourseDetail(){
        long startTime = System.currentTimeMillis();
        paramMap.put("courseId" , "20160824111604940");
        String content = invoker.get("courseInfo/getCourseDetail",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 根据课程的id,获取到用户名下最高金额的优惠券
     */
    @Test
    public void getCoursePrice(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147243543294583875");
        paramMap.put("courseId" , "2c8a437e70ac4fd58b007d89d92c9656");
        String content = invoker.get("courseInfo/getCoursePrice",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 用户提交意见反馈
     */
    @Test
    public void feedBack(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147141544478550513");
        paramMap.put("comment" , "哈哈ssssss");
        String content = invoker.post("member/feedBack/commitFeedBack", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取到订单列表
     */
    @Test
    public void getOrderList(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147218131671583875");
        String content = invoker.get("member/order/getOrderList", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取到订单的详细信息
     */
    @Test
    public void getOrderDetails(){
        long startTime = System.currentTimeMillis();
//        paramMap.put("orderId" , "getOrderDetails");
        paramMap.put("tokenKey" , "TOKEN_147247031504083875");
        String content = invoker.get("member/order/getOrderDetails", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取到一门课程下点赞数量最多的评论
     */
    @Test
    public void getOrderCommentOne(){
        long startTime = System.currentTimeMillis();
        paramMap.put("courseId" , "2016082410464211");
        String content = invoker.get("order/comment/getOrderCommentOne", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 通过分页的方式获取到全部的评论
     */
    @Test
    public void getOrderCommentAll(){
        long startTime = System.currentTimeMillis();
        paramMap.put("courseId" , "20160824104642110");
        paramMap.put("showNum" , "5");
        paramMap.put("page" , "1");
       // paramMap.put("showNum" , "4");
        String content = invoker.get("order/comment/getOrderCommentAll", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 用户提交对于课程的评论
     */
    @Test
    public void saveOrderComment(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147270918415150513");
        paramMap.put("comment" , "很好nijjj 7788874444");
        paramMap.put("courseId" , "20160824104642110");
        String content = invoker.post("order/comment/saveOrderComment", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 手动输入优惠券得到优惠券的金额
     */
    @Test
    public void getCouponAmount(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147079990610850513");
        paramMap.put("couponNumber" , "1dfecaea9da74ba7af39502308389fb7");
        String content = invoker.get("member/coupon/getCouponAmount", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取到全部的学车点的学车坐标点
     */
    @Test  //ok
    public void getAllLongitudeLatitude(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("enroll/driver/getAllLongitudeLatitude", null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 用户扫码添加优惠劵
     * tokenKey
     * agentId 代理商id
     * agentName代理商名称
     * agentType代理商类型
     * couponId  优惠券类型id
     * @return
     */
    @Test
    public void getCoupon(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147079990610850513");
        paramMap.put("agentId" , "06b7035696ec46dfb6dfd88150b004f9");
        paramMap.put("agentName" , "上海宏大汽车有限公司");
        paramMap.put("agentType" , "1");
        paramMap.put("couponId" , "1492d9bea526430cb626ea702aa99966");
        String content = invoker.get("member/coupon/getCoupon",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 普通用户的点赞操作
     */
    @Test
    public void insertCommentZan(){
        long startTime = System.currentTimeMillis();
        paramMap.put("orderCommentId" , "f63730f743054788860721105b8b3efe");
        String content = invoker.get("order/comment/zan/insertCommentZan",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    /**
     * 获取到用户名下全部的优惠券列表
     */
    @Test
    public void getPersonalCoupon(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147220252729283875");
        paramMap.put("showNum" , "10");
        paramMap.put("page" , "1");
        paramMap.put("type" , "1");
        String content = invoker.get("member/coupon/getPersonalCoupon", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void insertCommentZan1(){
        long startTime = System.currentTimeMillis();
        paramMap.put("orderCommentId" , "1");//45
        String content = invoker.get("order/comment/zan/insertCommentZan",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }
    @Test
    public void insertCommentZan2(){
        long startTime = System.currentTimeMillis();
        paramMap.put("orderCommentId" , "2");//23
        String content = invoker.get("order/comment/zan/insertCommentZan",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取关于我们
     */
    @Test
    public void getData(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("aboutUs/getData",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }
//    你问下@高婷如 她可以解决这个问题
    /**
     * 获取到首页展示的3张活动信息
     */
    @Test
    public void getActivityIndex(){
        long startTime = System.currentTimeMillis();
        paramMap.put("pageNo" , "1");
        String content = invoker.get("activity/info/index",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取到首页的3张资讯信息
     */
    @Test
    public void getIndex(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("index/info/getIndex",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取到资讯模块的咨询列表
     */
    @Test
    public void getIndexInfo(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("info/getIndexInfo",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    @Test
    public void getIndexInfoTwo(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("info/getIndexInfoTwo",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }
    /**
     * 测试消息推送
     */
    @Test
    public void pushTime(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147071210786050513");
        String content = invoker.get("/a/circular/circularInfo/pushTime", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void getInfoByPage(){
        long startTime = System.currentTimeMillis();
        paramMap.put("pageNo" , "1");
        String content = invoker.get("info/getInfoByPage",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 生成订单信息
     */
    @Test
    public void generateOrder(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147520271599391682");
        paramMap.put("mobile" , "18801291682");
        paramMap.put("totalPrice" , "7000.00");
        paramMap.put("prePayPrice" , "1500.00");
        paramMap.put("payType" , "1");//支付宝1：微信支付 2：银联支付 3
        paramMap.put("courseId" , "20160824104642110");
        paramMap.put("liveArea" , "上海市浦东区金陵国际");
        paramMap.put("couponAmount" , "0.0");
        paramMap.put("couponId" , "20160826155105216");
        paramMap.put("payMethod" , "2");
        paramMap.put("realName" , "徐翔");
        paramMap.put("source" , "1");
        String content = invoker.post("generate/order/generateOrder",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void getSign(){
        long startTime = System.currentTimeMillis();
        paramMap.put("orderId" , "2016082507472640");
        String content = invoker.get("generate/order/getSign",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void notify_url(){
        long startTime = System.currentTimeMillis();
        paramMap.put("out_trade_no" , "20160825111152572");
        paramMap.put("resultStatus" , "9000");
        String content = invoker.get("pay/aliPay/notify_url",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void queryCircularContent(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147245737808783875");
        paramMap.put("circularId" , "201608291308560");
        String content = invoker.get("getMemberCircular/queryCircularContent",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    @Test
    public void selectCanComment(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey" , "TOKEN_147269963100850513");
        paramMap.put("courseId" , "20160824104642110");
        String content = invoker.get("order/comment/selectCanComment",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void getIndexTwo(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("index/info/getIndexTwo",null);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    @Test   //ok
    public void getOrderTest(){
        long startTime = System.currentTimeMillis();
        paramMap.put("categoryId","67aa8cc583ee4deb82f7f32ab668c392");
        paramMap.put("tokenKey","TOKEN_147503278354750513");
        String content = invoker.get("/api/doTest/getOrderTest",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    /**
     * 获取  题目类型 题目 选项 正确答案 答案描述 （缺少）评论信息 点赞信息 是否收藏  考点标签 题目的正确率（缺少）
     */
    @Test
    public void getOrderTestById(){
        long startTime = System.currentTimeMillis();
        paramMap.put("testId","52");
        paramMap.put("tokenKey","TOKEN_147504758317513095");
        paramMap.put("categoryId","f2e73d81fbbe45cf81004a93f16f3acc");
        String content = invoker.get("/api/doTest/getOrderTestById",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test    //ok
    public void commitUserTestId(){
        long startTime = System.currentTimeMillis();
        paramMap.put("testId","52");
        paramMap.put("flag","1");
        paramMap.put("categoryId","f2e73d81fbbe45cf81004a93f16f3acc");
        paramMap.put("tokenKey","TOKEN_147495695960213095");
        paramMap.put("myAnswer","1,2");
        String content = invoker.get("/api/doTest/commitUserTestId",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test  //ok
    public void getFirstLevel(){
        long startTime = System.currentTimeMillis();
        String content = invoker.get("/api/doTest/getFirstLevel",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    @Test  //ok
    public void getSecondLevel(){
        long startTime = System.currentTimeMillis();
        paramMap.put("categoryId","40fa3a34b94842a78cdca7d41c547e31");
        String content = invoker.get("/api/doTest/getSecondLevel",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    @Test   //ok
    public void commitTestZan(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147495695960213095");
        paramMap.put("commentId","25");
        paramMap.put("testId","52");
        paramMap.put("zan","6");
        String content = invoker.get("/api/doTest/commitTestZan",paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }

    @Test  //ok
    public void commitComment(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147435471388950513");
        paramMap.put("testId","14");
        paramMap.put("comment","哈哈哈哈哈哈");
        String content = invoker.get("/api/doTest/commitComment", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test   //ok
    public void clickCollection(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147486937968813095");
        paramMap.put("testId","12");
        paramMap.put("categoryId","0f4a42bc261743bdb676f8186c963bc5");
        String content = invoker.get("/api/doTest/clickCollection", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    /**
     * 获取模拟测试题  ok
     */
    @Test
    public void getSimulationTest(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147503278354750513");
        paramMap.put("flag","false");
        paramMap.put("categoryId","67aa8cc583ee4deb82f7f32ab668c392");
        String content = invoker.get("/api/doTest/getSimulationTest", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }



    /**
     * 我的错题   ok
     */
    @Test
    public void getMyError(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147504758317513095");
        paramMap.put("categoryId","67aa8cc583ee4deb82f7f32ab668c392");
        String content = invoker.get("/api/doTest/getMyError", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    /**
     * 我的收藏   ok
     */
    @Test
    public void getMyCollection(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147504758317513095");
        paramMap.put("categoryId","67aa8cc583ee4deb82f7f32ab668c392");
        String content = invoker.get("/api/doTest/getMyCollection", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    /**
     * 我的收藏  ok
     */
    @Test
    public void deleteMyError(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147442531623450513");
        paramMap.put("testId","14");
        String content = invoker.get("/api/doTest/deleteMyError", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    /**
     * 分页查询 当前题目的  ok
     */
    @Test
    public void getCommentAndZanByPage(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","TOKEN_147442531623450513");
        paramMap.put("testId","14");
        paramMap.put("page","1");
        String content = invoker.get("/api/doTest/getCommentAndZanByPage", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void loginByMemberNameAndPassword(){
        long startTime = System.currentTimeMillis();
        paramMap.put("mobile","18626150513");
        paramMap.put("password","123qwe");
        paramMap.put("alias","Tokend41d8cd98f00b204e9800998ecf8427e19c695dd");
        String content = invoker.post("/member/information/loginByMemberNameAndPassword", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


    @Test
    public void getMyErrorDetail(){
        long startTime = System.currentTimeMillis();
        paramMap.put("tokenKey","18626150513");
        paramMap.put("testId","123qwe");
        paramMap.put("categoryId","Tokend41d8cd98f00b204e9800998ecf8427e19c695dd");
        String content = invoker.post("/api/doTest/getMyErrorDetail", paramMap);
        System.out.println(content);
        System.out.println("获取:" + (System.currentTimeMillis() - startTime));
        System.out.println(" total time: ");
        System.out.println(System.currentTimeMillis() - startTime);
    }


}
